//
//  BottomTitleButton.swift
//  AESOLAR_IOS
//
//  Created by Mr.Wang on 2019/10/17.
//  Copyright © 2019 Mr.Wang. All rights reserved.
//

import UIKit

class BottomTitleButton: UIButton {

    override func layoutSubviews() {
        super.layoutSubviews()
        
        self.imageView?.centerX = self.width * 0.5
        self.imageView?.y = 0
       
        self.titleLabel?.width = self.width
        self.titleLabel?.textAlignment = .center
        self.titleLabel?.x = 0
        self.titleLabel?.y = self.height - (self.titleLabel?.height ?? 0)
    }

}
